package com.itheima.health.dao;

import com.itheima.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author spt
 * @description 预约设置DAO
 * @date 2019/9/29
 **/
public interface OrderSettingDao {

    void save(OrderSetting orderSetting);

    int getOrderDateNum(String orderDate);

    //任务5-根据月份查询数据
    List<OrderSetting> selectByOrderDateRange(@Param("startDate") String startDate, @Param("endDate") String endDate);

    //任务6-添加预约设置(每日可预约人数和已经预约的人数)
    void insertTimeAndNumber(OrderSetting orderSetting);

    //任务10-手机端提交预约-根据日期查询
    OrderSetting selectOrderSetting(@Param("orderDate") Date orderDate);

    //任务10-手机端提交预约-修改已预约人数
    void updateOrderSetting(@Param("id") Integer id, @Param("reservations") int reservations);


}
